import request from "@/utils/request";
// 阿米巴预算

// 查询预定总额  /tool/unitPeriod/getBudgetPeriodData
export const getTotalAmountApi = params => {
  return request({
    url: `/tool/unitPeriod/getBudgetPeriodData`,
    method: "get",
    params
  });
};

// 设置预定总额  /tool/unitPeriod/setTotalAmount
export const setTotalAmountApi = data => {
  return request({
    url: `/tool/unitPeriod/setTotalAmount`,
    method: "put",
    data
  });
};

// 查询我分配的预算单元列表  /tool/unitPeriod/listByPeriod
export const getUnitPeriodListApi = params => {
  return request({
    url: `/tool/unitPeriod/listByPeriod`,
    method: "get",
    params
  });
};

// 修改我分配的预算单元 /tool/unitPeriod/edit
export const editUnitPeriodApi = data => {
  return request({
    url: `/tool/unitPeriod/edit`,
    method: "put",
    data
  });
};

// 分配给我的 查询科目数据 /tool/unitPeriod/getUnitPeriodData
export const getUnitPeriodDataApi = params => {
  return request({
    url: `/tool/unitPeriod/getUnitPeriodData`,
    method: "get",
    params
  });
};

// 查询修改科目预算的列表  /tool/unitPeriod/getInfo
export const getInfoUnitPeriodApi = params => {
  return request({
    url: `/tool/unitPeriod/getInfo`,
    method: "get",
    params
  });
};

// 阿米巴预算均分 /tool/unitPeriod/average
export const averageUnitPeriodApi = data => {
  return request({
    url: `/tool/unitPeriod/average`,
    method: "put",
    data
  });
};

// 确认人获取 核定额 待确认 待分账 已占用 本次可勾选 /tool/unitPeriod/getUnitConfirmData
export const getUnitConfirmDataApi = params => {
  return request({
    url: `/tool/unitPeriod/getUnitConfirmData`,
    method: "get",
    params
  });
};
// 获取我的echarts需要的数据  echart,按月统计的数据/tool/unitPeriod/countByMonth
export const getcountByMonthApi = params => {
  return request({
    url: `/tool/unitPeriod/countByMonth`,
    method: "get",
    params
  });
};
// 获取我分配的echarts数据，按科目统计/tool/unitPeriod/countBySubject
export const getcountBySubjectApi = params => {
  return request({
    url: `/tool/unitPeriod/countBySubject`,
    method: "get",
    params
  });
};
  // 查询周期内的报表 /tool/unitPeriod/countBySeller
  export const getCountBySellerApi = params => {
    return request({
      url: `/tool/unitPeriod/countBySeller`,
      method: "get",
      params
    });
  };
  
  // 查询周期内的报表清单 /tool/unitPeriod/getPdfList
  export const getPdfListApi = params => {
    return request({
      url: `/tool/unitPeriod/getPdfList`,
      method: "get",
      params
    });
  };
  
  // 查询周期内的报表url   /tool/unitPeriod/getPdfUrl
  export const getPdfUrlApi = params => {
    return request({
      url: `/tool/unitPeriod/getPdfUrl`,
      method: "get",
      params
    });
  };


